package com.jeeplus.common.annotation.uniqueValidate;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author xujin
 * @title: Unique
 * @projectName ESA_SX
 * @description: TODO
 * @date 2020-04-1415:29
 */
public class UniqueValidate implements ConstraintValidator<Unique, Object> {
    /**
     * 初始化方法
     * 
     */
    @Override
    public void initialize(Unique constraintAnnotation) {
    }

    /**
     * 验证方法
     * 验证成功返回: true
     * 验证失败返回: false
     */
    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        // userService.sayHello(value.toString());
        return false;
    }
}
